function(http_layer_find_spdlog)
	if (TARGET http_layer_spdlog_internal)
		return()
	endif ()

	if(WIN32)
		find_path(SPDLOG_INCLUDE_DIR spdlog ${HTTPLAYER_3RD_OUTDIR}/spdlog-1.14.1/include)
		if (CMAKE_BUILD_TYPE STREQUAL "Debug")
			find_library(SPDLOG_LIBRARY NAMES spdlogd.lib PATHS ${HTTPLAYER_3RD_OUTDIR}/spdlog-1.14.1/lib)
		else ()
			find_library(SPDLOG_LIBRARY NAMES spdlog.lib PATHS ${HTTPLAYER_3RD_OUTDIR}/spdlog-1.14.1/lib)
		endif ()
	else()
		find_path(SPDLOG_INCLUDE_DIR spdlog ${HTTPLAYER_3RD_OUTDIR}/spdlog-1.14.1/include)
		find_library(SPDLOG_LIBRARY NAMES libspdlog.a PATHS ${HTTPLAYER_3RD_OUTDIR}/spdlog-1.14.1/lib NO_DEFAULT_PATH)
	endif()

	include(FindPackageHandleStandardArgs)
	find_package_handle_standard_args(SPDLOG DEFAULT_MSG SPDLOG_LIBRARY SPDLOG_INCLUDE_DIR)

	add_library(http_layer_spdlog_internal INTERFACE)
	target_include_directories(http_layer_spdlog_internal INTERFACE "$<BUILD_INTERFACE:${SPDLOG_INCLUDE_DIR}>")
	target_link_libraries(http_layer_spdlog_internal INTERFACE ${SPDLOG_LIBRARY})
endfunction()


